LISPFILES=$(shell echo *.el)
ELCFILES = $(LISPFILES:.el=.elc)
EMACS=emacs
shell=/bin/sh
lispdir=$(shell pwd)
dotemacs=~/.emacs
#plugindir=/zleinter/emax
BATCH=$(EMACS) -batch \
	-eval "(load \"$(dotemacs)\")"\
	-eval "(setq default-directory \"$(lispdir)\")"\
-f batch-byte-compile
# -eval "(add-to-list 'load-path \"$(plugindir)/misc/\")"\
# -eval "(add-to-list 'load-path \"$(plugindir)/w3m/\")"\
# -eval "(add-to-list 'load-path \"$(plugindir)/auctex/\")"\
# -eval "(add-to-list 'load-path \"$(plugindir)/dotemax/\")"\
# -eval "(add-to-list 'load-path \"$(plugindir)/matlab/\")"\
# -eval "(add-to-list 'load-path \"$(plugindir)/imaxima/\")"\
# -eval "(add-to-list 'load-path \"$(plugindir)/geben/\")"\
# -eval "(add-to-list 'load-path \"$(plugindir)/ess/\")"\
# -eval "(add-to-list 'load-path \"$(plugindir)/yasnippet/\")"\
# -eval "(add-to-list 'load-path \"$(plugindir)/color-theme/\")"\
# -eval "(add-to-list 'load-path \"$(plugindir)/company/\")"\


all:$(ELCFILES)
%.elc: %.el
	$(BATCH) $<
clean:
	rm *.elc
